package com.coderman.domainservice.blogtopic.app.clientimpl;

import com.coderman.domainservice.blogtopic.client.api.BlogQueryService;
import com.coderman.domainservice.blogtopic.client.dto.BlogAggregateDTO;
import com.coderman.domainservice.blogtopic.client.dto.BlogPageQueryDTO;
import com.coderman.domainservice.blogtopic.client.dto.SimpleBlogForListDTO;
import com.coderman.domainservice.blogtopic.domain.ability.BlogIndiceService;
import com.coderman.domainservice.blogtopic.domain.gataway.BlogRepository;
import com.coderman.domainservice.blogtopic.domain.model.entity.IndicesStatisticsBO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Description:
 * date: 2021/3/31
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 * 博客查询服务
 */
@Service
public class BlogQueryServiceImpl implements BlogQueryService {
    @Autowired
    private BlogRepository blogRepository;
    @Override
    public List<SimpleBlogForListDTO> queryBlogPageList(BlogPageQueryDTO blogPageQueryDTO) {
        return null;
    }

    @Autowired
    private BlogIndiceService blogIndiceService;
    @Override
    public BlogAggregateDTO queryOneBlog(long blogId) {
        blogRepository.findOneBlog(blogId);
        //--BlogAggregateBO convert to BlogAggregateDTO
        List<IndicesStatisticsBO> statisticsBOList = blogIndiceService.getIndiceList(blogId);

        return null;
    }


}
